/**
 * @properties={typeid:35,uuid:"AAF249EC-1E95-4FAA-B963-8BD787150CAC"}
 */
var fConcepto = null;

/**
 * @properties={typeid:35,uuid:"1C36609D-9E4E-4807-90DE-FDFD2A164A0C",variableType:4}
 */
var fEstado = null;

/**
 * @properties={typeid:35,uuid:"CAC07401-B344-4174-B10E-388D73EE96AB",variableType:93}
 */
var fFechaDesde = null;

/**
 * @properties={typeid:35,uuid:"2A50BEBA-8D88-4BC0-B81F-BFC07C2571F1",variableType:93}
 */
var fFechaHasta = null;

/**
 * @properties={typeid:35,uuid:"C51E5432-EDD9-4594-959A-9567742FFA3A",variableType:4}
 */
var fSubdiarioId = null;

/**
 * @properties={typeid:35,uuid:"937F49E6-B847-4CA4-9DEB-7BA06D44117D",variableType:4}
 */
var fTipoId = null;

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"E7A95A6A-D305-42F6-86AE-B5F43BCBEFC8"}
 */
function ira_asiento_cab(event) {
	//forms.asientos_cab.controller.show()
	globals.mostrarForm('asientos_cab')
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"000EC963-1C0C-4867-8347-06672D79DB17"}
 */
function buscar(event) {
	
	if (elements.concepto1.readOnly = 0)
	{
		controller.find()
		
		var d1 = fFechaDesde
		var d2 = fFechaHasta
		if ((fFechaDesde != null) && (fFechaHasta != null))
		{
			d1.setHours(00);
			d1.setMinutes(00);
			d1.setSeconds(00);
			var df1 = utils.dateFormat(d1, 'dd-MM-yyyy hh:mm:ss')
		
			d2.setHours(23);
			d2.setMinutes(59);
			d2.setSeconds(59);
			var df2 = utils.dateFormat(d2, 'dd-MM-yyyy hh:mm:ss')
		}
		
		fecha 				= d1 + '...' + d2
		concepto 			= fConcepto
		subdiario_id 		= fSubdiarioId
		tipo_id 			= fTipoId 
		marca_consolidado 	= fEstado
		
		controller.search()
	}
	else
	{
		elements.concepto1.readOnly 		 = 0 
		elements.fFechaDesde.readOnly 		 = 0 
		elements.fFechaHasta.readOnly 		 = 0 
		elements.marca_consolidado1.readOnly = 0 
		elements.tipo_id1.readOnly 			 = 0 
		elements.subdiario_id.readOnly 		 = 0 
	}
}
